from none_bot_py_plugins.gen_svr.gen_svr import *


class UserSvr(GenSvrBase):

    def __init__(self, recv_id, report_svr):
        super(UserSvr, self).__init__(recv_id)
        self.__run_map = {}
        self.__report_svr = report_svr

    def handle_cast(self, from_id, msg, state):
        print(self.recv_id, ": ", msg)
        return "ok", state

    def handle_info(self, msg, state):
        return "ok", state

    def handle_call(self, from_id, msg, state):
        return "ok", "ok, received!", state

    def handle_stop(self, result, state):
        pass

    def handle_error(self, msg, state):
        return "ok", state

    def _init_(self, *args):
        print("user_svr ", self.recv_id, " create, report_svr is ", self.__report_svr)
        return []
